package com.example.time;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

public class DateTest3 {
    public static void main(String[] args) {
        DateTimeFormatter fmt = DateTimeFormatter.ofPattern("yyyy-MM-dd");
        LocalDate localDate = LocalDate.now();
        for(int i=0; i<5; i++){
            System.out.println(localDate.minusDays(i).format(fmt));
        }
    }
}
